<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="../../org/angular.min.js"></script>
</head>

<body ng-app="app" ng-controller="ctrl">
    失去焦点更新： <input type="text" ng-model="data" ng-model-options="{updateOn:'blur'}"> {{data}} <br> 1秒后更新：

    <input type="text" ng-model="name" ng-model-options="{debounce:1000}"> {{name}} <br> 失去焦点或3秒后更新
    <input type="text" ng-model="title" ng-model-options="{updateOn:'default blur',debounce:{default:3000,blur:0}}"> {{title}}
    <script>
        var m = angular.module('app', []);
        m.controller('ctrl', ['$scope', function($scope) {
            $scope.data = '';
            $scope.name = '';
            $scope.title = '';
        }])
    </script>
</body>

</html>
